package com.jspgou.cms.manager;

import java.util.Date;
import java.util.List;

import com.jspgou.common.page.Pagination;
import com.jspgou.cms.entity.Discuss;

public interface DiscussMng {
	public Discuss findById(Long id);

	public Discuss update(Discuss bean);

	public Discuss deleteById(Long id);
	
	public Discuss save(Discuss bean);
	
	public void deleteByorderItemId(Long orderItemId);
	
	public List<Discuss> getList(Long memberId,Long productId);
	
	public Discuss saveOrUpdate(Long productId,String content,Long memberId,Long storeId,Long orderItemId,String discussType);
	
	public Pagination getPage(Long productId,String userName,String productName,
			Date startTime,Date endTime,int pageNo,int pageSize,boolean cache);
	
	public Discuss[] deleteByIds(Long[] ids);
	
	//添加参数discussType,完成前台按评价类型显示评价数据
	public Pagination getPage(Long memberId,Long productId,Long storeId,String discussType,int pageNo,int pageSize,boolean start);
	//添加方法，根据discussType获取数据指定商品评价。
	public List<Discuss> findByType(Long productId,String discussType);
	//添加方法，按照discussType删除
	public List<Discuss> deleteByType(String discussType);

}